package com.crm.jdy.service.drp;

import com.crm.jdy.common.dto.WListInfoDto;
import com.crm.jdy.common.mapper.FRecordInfoMapper;
import com.crm.jdy.common.pojo.TeamInfo;
import com.crm.jdy.common.pojo.WListInfo;
import com.crm.jdy.common.mapper.WListInfoMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.dubbo.config.annotation.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**   
 * @Description:(仓库清点列表信息服务实现)
 *
 * @version: V1.0
 * @author: kong
 * 
 */
@Service(version = "${service.version}")
@Component
public class WListInfoServiceImpl  extends ServiceImpl<WListInfoMapper,WListInfo> implements WListInfoService  {


    @Autowired
    WListInfoMapper wListInfoMapper;


    @Override
    public PageInfo<WListInfo> seleteWListInfo(WListInfoDto projectInfoDto) {
        PageHelper.startPage( projectInfoDto.getCurrentPage(),projectInfoDto.getPageSize());
        List<WListInfo> bookList = wListInfoMapper.seleteWListInfo(projectInfoDto);
        PageInfo<WListInfo> pageInfo = new PageInfo<WListInfo>(bookList);
        return pageInfo;
    }

    @Override
    public boolean updateWListInfo(WListInfo projectInfo) {
        return wListInfoMapper.updateById(projectInfo) > 0;
    }

    @Override
    public boolean addWListInfo(WListInfo projectInfo) {
        return wListInfoMapper.insert(projectInfo) > 0;
    }

    @Override
    public boolean removeWListInfo(String listId) {
        return wListInfoMapper.deleteById(listId) > 0;
    }
}